package cn.tedu.spring.life;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestUser {
    @Test
    public void lifeTest(){
        ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext
                ("bean-life.xml");
        User user=context.getBean("user",User.class);
        System.out.println("4-bean使用阶段");
        context.close();
    }
}
